package EveryDayPractice;

import java.util.Scanner;

public class Practice06 {
     public static void main(String[] args) {
          Scanner sc = new Scanner(System.in);

          int m = sc.nextInt();
          int n = sc.nextInt();
          int a=100;
         if(m>n)
         {
              int mm=m;
              int nn=n;
          while(a>0)
          {
               a=mm%nn;
               if(a==0)
               {
                    System.out.println("最大公约数"+nn+",最小公倍数是"+m*n/nn);
                    break;
               }
                mm=nn;
                nn=a;
          }
         }
         else
              System.out.println("输入不合法");
     }
}
